//引入登录接口
import { req_login } from "@/api/registerLogin";

export default{
    login_a:async ({commit},login_obj)=>{
        console.log(login_obj);
         
        //收集到用户名和密码发送ajax
       let result = await req_login({
        method:'post',
        url:'/login',
        arg:login_obj,
        headerType:"form"

       });
       console.log(result)
       commit('login',{
        user_name:login_obj.user_name,
        info:result.data.info,
        token:result.data.token
       })
        console.log(commit);
    }
} 